import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
// 新增路由
import Home from '@/components/Home'
import FirstPage from '@/components/FirstPage'
import SecondPage from '@/components/SecondPage'
// 新增路由
import Navbar from '@/components/bar/Navbar'

// 子页面添加组件
import FirstPart from '@/components/HomeComponents/FirstPart'
import SecondPart from '@/components/HomeComponents/SecondPart'
//自己写的样式
import '@/assets/style/theme.css';

Vue.use(Router)

export default new Router({
    routes: [{

            path: '/Home',
            name: 'Home',
            component: Home,
            path: '/',
            name: 'HelloWorld',
            component: HelloWorld
        },
        {
            path: '/',
            name: 'Navbar',
            component: Navbar
        },
        // 新增路由
        {
            path: '/Home',
            name: 'Home',
            component: Home,
            // 子组件路由
            children: [{
                    path: '/',
                    name: 'FirstPart',
                    component: FirstPart
                },
                {
                    path: 'SecondPart',
                    name: 'SecondPart',
                    component: SecondPart
                }
            ]
        },
        {
            path: '/FirstPage',
            name: 'FirstPage',
            component: FirstPage
        },
        {
            path: '/SecondPage',
            name: 'SecondPage',
            component: SecondPage
        }
    ]
})